package com.shop.entity;

import com.mybatisflex.annotation.Id;
import com.mybatisflex.annotation.KeyType;
import com.mybatisflex.annotation.Table;
import io.swagger.v3.oas.annotations.media.Schema;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.sql.Timestamp;

/**
 * 商品图片 实体类。
 *
 * @author 彭新才 
 * @since 2024-10-12
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Schema(description = "商品图片")
@Table(value = "shop_product_image")
public class ShopProductImage implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 主键id
     */
    @Id(keyType = KeyType.Auto)
    @Schema(description = "主键id")
    private Long id;

    /**
     * 商品id
     */
    @Schema(description = "商品id")
    private Long productId;

    /**
     * 图片地址
     */
    @Schema(description = "图片地址")
    private String imageUrl;

    /**
     * 图片类型0商品主图，1详情图
     */
    @Schema(description = "图片类型0商品主图，1详情图")
    private Integer imageType;

    /**
     * 创建时间
     */
    @Schema(description = "创建时间")
    private Timestamp createTime;

}
